<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <title>基础数据管理-业务系统模块管理新增OR编辑</title>
    <script src="/scripts/boot.js"></script>
    <style type="text/css">
        .asLabel .mini-textbox-border,
        .asLabel .mini-textbox-input,
        .asLabel .mini-buttonedit-border,
        .asLabel .mini-buttonedit-input,
        .asLabel .mini-textboxlist-border
        {
            border:0;background:none;cursor:default;
        }
        .asLabel .mini-buttonedit-button,
        .asLabel .mini-textboxlist-close
        {
            display:none;
        }
        .asLabel .mini-textboxlist-item
        {
            padding-right:8px;
        }
    </style>
</head>
<body class="bg-white">
<div id="viewForm">
    <div class="title-info mb-20"><span>基本信息</span></div>
    <table class="table-bg" border="0" cellpadding="1" cellspacing="1" style="width:100%;table-layout:fixed;">
        <colgroup>
            <col width="135px"></col>
            <col width="50%"></col>
            <col width="135px"></col>
            <col width="50%"></col>
        </colgroup>
        <tr>
            <td class="text-titlebg">业务类型名称</td>
            <td>
                <input type="hidden" class="mini-hidden" name="id"/>
                <select id="businessTypeId" name="businessTypeId" class="mini-combobox w200 asLabel" textField="typeName" valueField="id" errorMode="none" onvalidation="onChoseValidation" required="true" requiredErrorText="请选择"></select>
            </td>
            <td class="text-titlebg">业务系统名称</td>
            <td>
                <select id="busiSysId" name="busiSysId" class="mini-combobox w200 asLabel" ajaxType="post" url="/dictionary/listValues?name=busiSys" textField="value" valueField="id" errorMode="none" onvalidation="onChoseValidation" required="true" requiredErrorText="请选择"></select>
            </td>
        </tr>
        <tr>
            <td class="text-titlebg">阶段名称</td>
            <td>
                <input type="hidden" class="mini-hidden" name="id"/>
                <select id="phaseId" name="phaseId" class="mini-combobox w200 asLabel" ajaxType="post" url="/dictionary/listValues?name=phase" textField="value" valueField="id" errorMode="none" onvalidation="onChoseValidation" required="true" requiredErrorText="请选择"></select>
            </td>
            <td class="text-titlebg">模块名称</td>
            <td>
                <input name="name" class="mini-textbox w220 asLabel" required="true" vtype="maxLength:48" errorMode="none" onvalidation="onNullValidation" requiredErrorText="请输入"/>
            </td>
        </tr>
        <tr>
            <td class="text-titlebg">编码</td>
            <td colspan="3">
                <input name="code" class="mini-textbox w220 asLabel" required="true" vtype="maxLength:48" errorMode="none" onvalidation="onEnglishAndNumberValidation" requiredErrorText="请输入"/>
            </td>
        </tr>
        <tr>
            <td class="text-titlebg noEmpty">备注</td>
            <td colspan="3" class="wp">
                <textarea name="remark" class="mini-textarea wtextarea asLabel" emptyText=""></textarea>
            </td>
        </tr>
    </table>
    <div class="chose-toolbar">
        <a class="chose-button" onclick="CloseWindow('close')">取消</a>
        <a class="chose-button save-button" onclick="view.save()">保存</a>
    </div>
</div>
<div id="mask" class="mask-hidden"></div>
<script type="text/javascript">
    var post_flag,form,state,msgState;
    var view = {
        init: function () {
            post_flag = false; //设置一个对象来控制是否进入AJAX过程
            msgState = true;
            mini.parse();
            form = new mini.Form("#viewForm");
            common.busiType();
            //typeNew.SetData(data);
        },
//    数据展示
        SetData: function (data) {
            data = mini.clone(data);
            state = data.state;
            $.ajax({
                url:"/busiModel/info?id=" + data.id,
                type: "post",
                success: function (text) {
                    common.labelModel(form);
                    //跨页面传递的数据对象，克隆后才可以安全使用
                    var datas = mini.decode(text);   //反序列化成对象
                    form.setData(datas);             //设置多个控件数据
                },
                error:function (errorMsg) {
                    common.prompt(errorMsg.message);
                }
            });
        }
    };
    view.init();
</script>
</body>
</html>